
<%@ page import="pl.dmcs.grails.Employee" %>
<!DOCTYPE html>
<html>
    <head>
        <meta name="layout" content="main">
        <link rel="stylesheet" href="${resource(dir: 'css/employee', file: 'index.css')}" type="text/css">
        <link rel="stylesheet" href="${resource(dir: 'css/employee', file: 'form.css')}" type="text/css">
        <g:set var="entityName" value="${message(code: 'employee.label', default: 'Employee')}" />
        <title><g:message code="default.list.label" args="[entityName]" /></title>
    </head>
    <body>
        <a href="#list-employee" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
        <div class="nav" role="navigation">
            <ul>
                <li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
                <li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
                </ul>
            </div>
            <div id="list-employee" class="content scaffold-list" role="main">
                <h1><g:message code="default.list.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
                <div class="message" role="status">${flash.message}</div>
            </g:if>
            <g:each in="${employeeCategoryInstanceList}" status="catStatus" var="employeeCategoryInstance">
                <fieldset>
                    <legend class="employee-cat-title">
                        ${employeeCategoryInstance.name}
                    </legend>
                    <g:render template="index" model="[employeeList: employeeCategoryInstance.employees]"/>
                </fieldset>
            </g:each>

            <g:if test="${notAssignedEmployeesList != null && !notAssignedEmployeesList.isEmpty()}">
                <fieldset>
                    <legend class="employee-cat-title">
                        Not Assigned
                    </legend>
                    <g:render template="index" model="[employeeList: notAssignedEmployeesList]"/>
                </fieldset>
            </g:if>
        </div>
    </body>
</html>
